<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core">
  
        <ui:composition template="templates/template_login.xhtml">
            <h:head>

                <title>Seja bem-vindo ao ThreeDs!</title>

            </h:head>

            <ui:define name="content">
                <h:body>

                    <center>
                        <p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>

                        <p:dialog modal="true" widgetVar="statusDialog" header="Status" 
                                  draggable="false" closable="false">
                            <p:graphicImage value="/design/ajaxloadingbar.gif" />
                        </p:dialog>


                        <h:form>

                            <p:panel id="panel" header="Login">



                                <h:panelGrid columns="3" cellpadding="5">
                                    <h:outputLabel for="login" value="E-mail: *" />
                                    <p:inputText id="login" 
                                                 value="#{projetistaBean.projetista.EMail}"
                                                 required="true" requiredMessage="#{msgs.campoobrigatorio}"
                                                 label="login">

                                    </p:inputText>
                                    <p:message for="login" />

                                    <h:outputLabel for="senha" value="#{msgs.senha}: *"/>
                                    <p:password id="senha" 
                                                value="#{projetistaBean.projetista.senha}"  
                                                maxlength="20" feedback="false" 
                                                required="true"  requiredMessage="#{msgs.campoobrigatorio}"
                                                label="senha" />
                                    <p:message for="senha" />

                                </h:panelGrid>


                                <p:commandButton value="#{msgs.entrar}" image="imagens/new_project.png"  action="#{projetistaBean.login()}" ajax="false" >

                                </p:commandButton>


                            </p:panel>
                        </h:form>
                        <h:form>
                            <p:commandButton value="#{msgs.registrar}" image="imagens/new_project.png" action="novoProjetista.xhtml" ajax="false">
                                   
                                </p:commandButton>
                        </h:form>
                           

                    </center>

                </h:body> 
            </ui:define>

        </ui:composition>
    
</html>
